package gvjclient.ui;
/*
Copyright 2010 Arpit Sud
This file is part of gv-jclient. (http://code.google.com/p/gv-jclient/)
gv-jclient is an Unofficial Java client for Google Voice.

gv-jclient is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

gv-jclient is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with gv-jclient.  If not, see <http://www.gnu.org/licenses/>.
*/

import java.awt.Dimension;

import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JSplitPane;


public class MainPanel extends JPanel
{
	private JSplitPane splitPane;
//	private JTree tree;
//	private JPanel rightPanel;

	
	public MainPanel(AccountsTree tree, RightPanel rightPanel)
	{
		
		JScrollPane listScrollPane;
/*		JComboBox phoneList = new JComboBox(phones);
        if (phones.length>1)
        	phoneList.setSelectedIndex(0);
        phoneList.addActionListener(GVJclientUI.get_instance());
*/
/*        JComboBox accountList = new JComboBox(accounts);
        if (accounts.length >1)
        	accountList.setSelectedIndex(0);
        accountList.addActionListener(GVJclientUI.get_instance());
       */

		listScrollPane = new JScrollPane(tree);
        //rightPanel = new JPanel();
        //rightPanel.add(accountList);        
        //rightPanel.add(phoneList);
        
       
        splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
        listScrollPane, rightPanel);
        splitPane.setOneTouchExpandable(true);
        splitPane.setDividerLocation(500);
        
        Dimension minimumSize = new Dimension(150, 50);
        listScrollPane.setMinimumSize(minimumSize);
        rightPanel.setMinimumSize(minimumSize);

        //Provide a preferred size for the split pane.
        splitPane.setPreferredSize(new Dimension(1000, 400));
	}


	public JSplitPane getSplitPane() {
		return splitPane;
	}
}